#ifndef A6_NAMESERVER_H
#define A6_NAMESERVER_H
#include <uC++.h>
#include <vector>
#include "Printer.h"
#include "VendingMachine.h"

_Task VendingMachine;

_Task NameServer 
{
    Printer& 		myPrinter;
    unsigned int 	myNumVendingMachines;
    unsigned int 	myNumStudents;
    std::vector<unsigned int> myStudentList;
    VendingMachine**  myVendingMachines;
    unsigned int currentRegistered;
	void main();

public:
	NameServer( Printer &prt, unsigned int numVendingMachines, unsigned int numStudents );
	~NameServer();
	void VMregister( VendingMachine *vendingmachine );
	VendingMachine *getMachine( unsigned int id );
	VendingMachine **getMachineList();
};

#endif
